<template>
	<div id="selectest">
		<v-menu @accept="request"></v-menu>
		<v-list v-bind:list="dataList"></v-list>
		<!--<more></more>-->
	</div>
	
</template>

<script>
  import vMenu from './menu';
  import vList from './list';
  import more from './more';
  export default {
  	data(){
  		return {
  			dataList: []
  		}
  	},
  	methods:{
  		request(type){
  			console.log(type);
			this.$http({
				url: 'http://localhost:8080/request',
				params: {
					type: type || '0'
				}
//				methods: 'GET'
			}).then(function(req){
//				console.log(req.bodyText);
//				let result = JSON.parse(JSON.stringify(req.bodyText));
//				console.log(result);
//			如果是jsonp还得转数据
//			let result = JSON.parse(req);
//			console.log(req);
			this.dataList = req.body;
//			console.log(this.dataList);
})
  		}
  	},
  	components: {
  		vMenu: vMenu,
  		vList: vList,
		more
  	},
  	mounted:
  		function(){
  			this.request();
  		}

  }
	
</script>

<style>
	
</style>